/*
 * Node.h
 *
 *  Created on: Jul 2, 2013
 *      Author: dsweeney
 */

#ifndef NODE_H_
#define NODE_H_

#include "CommonTypes.h"
#include <string>
#include <map>
#include <queue>

class Node
{
public:
	Node (char letter);
	Node (char letter, Node* parent);
	~Node();
	bool addChild(char letter);
	Node* getChild (char letter);
	Node* getNextChild();
	uint numWholeWordChildren();
	uint getScore();
	void getString(std::string* string);
	char getLetter();
	void printRack(){}
	void listCopy(const char* source);
	void reInit();

	bool explored;
	bool wholeWord;
	static std::map<char, int> charToPoint;
	std::string* listOfChildren;
	int index;
	Node* parent;
	static std::string fullSet;
	bool fullSetInUse;
private:
	void init(void);

	char letter;

	p_Node children[26];
	uint lowercaseAoffset;
	uint lastGet;
	uint numChildren;
	uint rawScore;


	static uint id;
};

#endif /* NODE_H_ */
